Skip to content

feat(boto3): Support span streaming#6193

Merged
alexander-alderman-webb merged 23 commits intomasterfrom
webb/boto3/span-first
May 6, 2026
Merged

feat(boto3): Support span streaming#6193
alexander-alderman-webb merged 23 commits intomasterfrom
webb/boto3/span-first

Conversation

@alexander-alderman-webb
Copy link
Copy Markdown
Contributor

@alexander-alderman-webb alexander-alderman-webb commented May 4, 2026

Description

In the streaming path, use

  • http.request.method instead of http.method
  • url.full instead of url
  • url.query instead of aws.request.url
  • url.fragment instead of http.fragment
  • rpc.method instead of both aws.service_id and aws.operation_name

Adapting Tests

sed commands used for converting transaction context managers:

  • sed -i '' 's/sentry_sdk.start_transaction()/sentry_sdk.traces.start_span(name="custom parent")/g'
  • sed -i '' 's/sentry_sdk.start_transaction() as transaction/sentry_sdk.traces.start_span(name="custom parent") as span/g'
  • sed -i '' 's/start_transaction() as transaction/sentry_sdk.traces.start_span(name="custom parent") as span/g'

sed commands used for converting specific attributes:

  • sed -i '' 's/http.method/http.request.method/g'
  • sed -i '' 's/aws.request.url/url.full/g'
  • sed -i '' 's/http.fragment/url.fragment/g'
  • sed -i '' 's/http.query/url.query/g'

sed commands used for converting event capture:

  • sed -i '' 's/assert len(spans) == 2/assert len(spans) == 3/g'
  • sed -i '' 's/assert len(spans) == 1/assert len(spans) == 2/g'
  • sed -i '' 's/(event, ) = (item.payload for item in items if item.type == "span")/spans = [item.payload for item in items if item.type == "span"]/g'
  • sed -i '' 's/event["spans"]/spans/g'
  • sed -i '' '/assert event["type"] == "transaction"/d'
  • sed -i '' 's/transaction.finish()/span.finish()/g'
  • sed -i '' 's/(event,) = events/(event, ) = (item.payload for item in items if item.type == "span")/g'
  • sed -i '' 's/events = capture_events()/items = capture_items("event", "transaction", "span")/g'
  • sed -i '' 's/capture_events,/capture_items,/g'

sed commands used for converting op:

  • sed -i '' 's/["op"]/["attributes"]["sentry.op"]/g'

sed commands used for converting origin:

  • sed -i '' 's/["origin"]/["attributes"]["sentry.origin"]/g'

sed commands used for converting description:

  • sed -i '' 's/description/name/g'

sed commands used for converting data to attributes:

  • sed -i '' 's/["data"]/["attributes"]/g'

Issues

Closes #6007

Reminders

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 4, 2026

Codecov Results 📊

1869 passed | ⏭️ 341 skipped | Total: 2210 | Pass Rate: 84.57% | Execution Time: 2m 56s

All tests are passing successfully.

❌ Patch coverage is 6.82%. Project has 12980 uncovered lines.

Files with missing lines (2)
File Patch % Lines
boto3.py 13.13% ⚠️ 86 Missing
consts.py 99.22% ⚠️ 2 Missing

Generated by Codecov Action

Comment thread tests/integrations/boto3/test_s3.py Outdated
Comment thread sentry_sdk/integrations/boto3.py
Comment thread tests/integrations/boto3/test_s3.py
Comment thread sentry_sdk/integrations/boto3.py
Comment thread sentry_sdk/integrations/boto3.py Outdated
Comment thread sentry_sdk/integrations/boto3.py Outdated
Comment thread sentry_sdk/integrations/boto3.py Outdated
@alexander-alderman-webb alexander-alderman-webb marked this pull request as ready for review May 5, 2026 12:22
@alexander-alderman-webb alexander-alderman-webb requested a review from a team as a code owner May 5, 2026 12:22
Comment thread sentry_sdk/integrations/boto3.py Outdated
Comment thread tests/integrations/boto3/test_s3.py Outdated
Comment thread sentry_sdk/integrations/boto3.py Outdated
Comment thread sentry_sdk/integrations/boto3.py
Comment thread sentry_sdk/integrations/boto3.py
Comment thread sentry_sdk/integrations/boto3.py Outdated
Comment thread sentry_sdk/integrations/boto3.py Outdated
Comment thread sentry_sdk/integrations/boto3.py
Comment thread sentry_sdk/integrations/boto3.py
Comment thread sentry_sdk/integrations/boto3.py
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 17b42e6. Configure here.

Comment thread sentry_sdk/integrations/boto3.py
Copy link
Copy Markdown
Contributor

@sentrivana sentrivana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, left one nit.

Comment thread sentry_sdk/integrations/boto3.py
Comment thread sentry_sdk/integrations/boto3.py
@alexander-alderman-webb alexander-alderman-webb merged commit fb587da into master May 6, 2026
165 of 167 checks passed
@alexander-alderman-webb alexander-alderman-webb deleted the webb/boto3/span-first branch May 6, 2026 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate boto3 to span first

3 participants